<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <p>注册成功 <span class="info">10</span>秒后跳转<a href="http://www.baidu.com">百度的</a></p>
</body>
<script>
    var t = 10;
    var info = document.querySelector('span');
    function f()
    {
        if(t > 0)
        {
            t--;
            info.innerHTML = t;
        }
        else 
            window.location.href = 'http://www.baidu.com';
    }
    setInterval(f, 1000);
</script>
</html>